# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-hook-lexwrap
pkgver=0.26
pkgrel=6
pkgdesc="Lexically-scoped resource management"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/release/Hook-LexWrap"
depends=('perl')
checkdepends=('perl-test-pod')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/E/ET/ETHER/Hook-LexWrap-$pkgver.tar.gz")
sha512sums=('f7771d4fb8379f43fa5b864e345f4526603914c3c486c637ea07fb9e2d41569bf40948a9039fab7d10c683fb85e16a8653876613903d34cc6801fcc9e92aa58b')

build() {
  cd Hook-LexWrap-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Hook-LexWrap-$pkgver
  make test
}

package() {
  cd Hook-LexWrap-$pkgver
  make DESTDIR="$pkgdir" install
}
